# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=dpkt-svn
pkgver=82
pkgrel=3
pkgdesc='Fast, simple packet creation / parsing module for python, with definitions for the basic TCP/IP protocols.'
arch=('x86_64' 'aarch64')
provides=('dpkt')
license=('BSD')
url='http://code.google.com/p/dpkt/'
depends=('python2')
makedepends=('subversion')
_svntrunk=('http://dpkt.googlecode.com/svn/trunk')
_svnmod='dpkt-read-only'


prepare() {
  svn co $_svntrunk -r $pkgver $svnmod
}

package() {
  cd trunk

  python2 setup.py install --prefix="$pkgdir/usr"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" AUTHORS CHANGES HACKING \
    README
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

